﻿using System;
using System.Collections.Generic;
using System.IO;
using Windows.UI.Xaml.Media.Imaging;
using System.Linq;
using System.Windows.Input;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Devices.Input;
using Windows.UI.Core;
using System.Threading;
using System.Collections.Concurrent;

namespace RoboRun
{
    class ButtonFlash
    {
        public static async void buttonFlash(Image image, Uri uri1, Uri uri2) //Put in a seperate class as a library function for controls
        {
            for (int i = 0; i < 5; i++)
            {
                await System.Threading.Tasks.Task.Delay(TimeSpan.FromMilliseconds(50));
                image.Source = new BitmapImage(uri1);
                await System.Threading.Tasks.Task.Delay(TimeSpan.FromMilliseconds(50));
                image.Source = new BitmapImage(uri2);
            }
        }
    }
}
